package com.xinqi.modules.course.clazz.controller.admin;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.course.clazz.service.ClassCourseCodeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "课程码控制层", description = "课程码控制层")
@RestController
@RequestMapping("/admin/class")
@RequiredArgsConstructor
public class ClassCourseCodeAdminController {

    private  final ClassCourseCodeService classCourseCodeService;
    @Operation(summary = "班级表-分页")
    @GetMapping("/generate/{count}")
    public R generateCode(@PathVariable("count") Integer count) {
        classCourseCodeService.generateNumber(count);
        return R.ok();
    }

}
